package com.team11.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.team11.server.pojo.InformationLIst;
import com.team11.server.pojo.LInformation;
import com.team11.server.pojo.dto.RespBean;
import com.team11.server.pojo.dto.RespPageBean;
import com.team11.server.pojo.dto.vo.AddLeave;
import com.team11.server.pojo.dto.vo.Leave;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.time.LocalDate;
import java.util.List;
/**
 * <p>
 *  服务类
 * </p>
 *
 * @author mahongtao
 * @since 2021-06-17
 */

public interface ILInformationService extends IService<LInformation> {
    /**
     * 获取所有的审批状态
     * @return
     */
    Object getStatus();

    /**
     * 获取请假管理的记录（分页）
     * @param currentPage
     * @param size
     * @param informationLIst
     * @param startTime
     * @param endTime
     * @return
     */

    RespPageBean getLInformationByPage(Integer currentPage, Integer size,
                                       InformationLIst informationLIst, LocalDate startTime, LocalDate endTime);
    /**
     * 获取所有请假原因
     * @return
     */
    Object getReason();

    /**
     * 审批请假记录
     * @param lId
     * @param status
     * @return
     */
    RespBean approval(List<Integer> lId, Integer status, String failReason);


    /**
     * 根据学生id，查询请假详情
     * @param sid
     * @return
     */
    List getdetail(Integer sid);



    /**
     * 学生端：请假管理：获取该学生请假管理的记录（分页）
     * @param currentPage
     * @param size
     * @param leave
     * @return
     */
    RespPageBean getStudentLInformation(Integer currentPage, Integer size,Integer sNumber,
                                        Leave leave);

    /**
     * 学生端：请假管理：新增请假
     * @param sid
     * @param files
     * @param request
     * @return
     */
    RespBean addLeave(Integer sid, AddLeave addLeave,MultipartFile[] files, HttpServletRequest request);

    /**
     * 进入新增
     * @param lId
     * @return
     */
//    List openLeave(Integer sid,Integer lId);
    List openLeave(Integer lId);

    /**
     * 编辑请假
     * @param lId
     * @param addLeave
     * @param files
     * @param request
     * @return
     */
    RespBean updateLeave(Integer lId, AddLeave addLeave, MultipartFile[] files, HttpServletRequest request);
}
